package logrus_util

import (
	"github.com/sirupsen/logrus"
)

const (
	DebugLevel   = logrus.TraceLevel
	ReleaseLevel = logrus.InfoLevel

	DefaultFileName        = "./logs/sever.log"
	DefaultTimestampFormat = "2006-01-02 15:04:05.000"
)

type Logger struct {
	*logrus.Logger
}

func (logger *Logger) SetMail(mailConfig IMailConfig) error {
	hook, err := NewMailHook(mailConfig)
	if nil != err {
		return err
	}

	logger.AddHook(hook)

	return nil
}
